﻿/*****************************************************************
 *@Copyright all rights reserved © 2014 Yuga
 *@author YUga studio
 *Contact: zengkang007@gmail.com
 *****************************************************************/
package com.oplink.webbase.modules.invoicing.dao;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Component;

import com.oplink.webbase.common.persistence.BaseDao;
import com.oplink.webbase.common.persistence.BaseDaoImpl;


import com.oplink.webbase.modules.invoicing.entity.Supplier;

/**
 * 告警DAO接口
 * @author YUga studio
 * @version 2015-01-12
 */
public interface SupplierDao extends SupplierDaoCustom, CrudRepository<Supplier, Long> {

	@Modifying
	@Query("update Supplier set delFlag='" + Supplier.DEL_FLAG_DELETE + "' where id = ?1")
	public int deleteById(Long id);
	
}

/**
 * DAO自定义接口
 * @author YUga studio
 */
interface SupplierDaoCustom extends BaseDao<Supplier> {

}

/**
 * DAO自定义接口实现
 * @author YUga studio
 */
@Component
class SupplierDaoImpl extends BaseDaoImpl<Supplier> implements SupplierDaoCustom {

}